import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sca = new Scanner(System.in);
        char c = sca.nextLine().charAt(0);//取第一个元素
        int num = (int)c;
        System.out.println(num);
    }
}
